using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace WCFDicing.DataContracts
{
    /// <summary>
    /// klasa opisujaca opcje stolu do gry w kosci
    /// </summary>
    [System.Runtime.Serialization.DataContractAttribute( Namespace = "http://WCFDicing.DataContracts/2008/01", Name = "DicingRoomOption" )]
    public class DicingRoomOption
    {
        #region Fields + Get

        private int entryMoney;

        /// <summary>
        /// get i set ilosc wymaganych pieniedzy aby wejsc na stol
        /// </summary>
        [System.Runtime.Serialization.DataMemberAttribute( IsRequired = false, Name = "EntryMoney", Order = 0 )]
        public int EntryMoney
        {
            get { return entryMoney; }
            set { entryMoney = value; }
        }

        /// <summary>
        /// maksymalna ilosc graczy przy stole
        /// </summary>
        private int maximumPlayers;

        /// <summary>
        /// get i set maksymalna ilosc graczy przy stole
        /// </summary>
        [System.Runtime.Serialization.DataMemberAttribute( IsRequired = false, Name = "MaximumPlayers", Order = 1 )]
        public int MaximumPlayers
        {
            get { return maximumPlayers; }
            set { maximumPlayers = value; }
        }

        /// <summary>
        /// maksymalna kwota zakladu
        /// </summary>
        private int maximumBet;

        /// <summary>
        /// get i set maksymalna kwota zakladu
        /// </summary>
        [System.Runtime.Serialization.DataMemberAttribute( IsRequired = false, Name = "MaximumBet", Order = 2 )]
        public int MaximumBet
        {
            get { return maximumBet; }
            set { maximumBet = value; }
        }

        /// <summary>
        /// minimalna kwota 1. zakladu
        /// </summary>
        private int minimumBet;

        /// <summary>
        /// get i set minimalna kwota 1. zakladu
        /// </summary>
        [System.Runtime.Serialization.DataMemberAttribute( IsRequired = false, Name = "MinimumBet", Order = 3 )]
        public int MinimumBet
        {
            get { return minimumBet; }
            set { minimumBet = value; }
        }

        /// <summary>
        /// ilosc celowanych rzutow koscmi
        /// </summary>
        private int chanceCount;

        /// <summary>
        /// get i set ilosc celowanych rzutow koscmi
        /// </summary>
        [System.Runtime.Serialization.DataMemberAttribute( IsRequired = false, Name = "ChanceCount", Order = 4 )]
        public int ChanceCount
        {
            get { return chanceCount; }
            set { chanceCount = value; }
        }

        #endregion

        #region Constructors
        /// <summary>
        /// konstrukor tworzacy domyslne opcje
        /// </summary>
        public DicingRoomOption() 
        {
            //domysle ustawienia ;)
            this.chanceCount = 3;
            this.entryMoney = 0;
            this.maximumBet = 2000;
            this.minimumBet = 10;
        }

        /// <summary>
        /// konstruktor z ustawieniem opcji
        /// </summary>
        /// <param name="maxPlayer">maksymalna ilosc graczy</param>
        /// <param name="money">minimalna ilosc pieniedzy na koncie aby wejsc do pokoju</param>
        /// <param name="maxBet">maksymalna stawka zakladu</param>
        /// <param name="minBet">minimalna stawka zakladu</param>
        /// <param name="chance">ilosc rzutow</param>
        public DicingRoomOption( int maxPlayer, int money, int maxBet, int minBet, int chance )
        {
            this.chanceCount = chance;
            this.entryMoney = money;
            this.maximumBet = maxBet;
            this.minimumBet = minBet;
        }

        /// <summary>
        /// konstruktor kopiujacy
        /// </summary>
        /// <param name="opt">obiekt ktory kopiujemy</param>
        public DicingRoomOption( DicingRoomOption opt )
        {
            this.chanceCount = opt.chanceCount;
            this.entryMoney = opt.entryMoney;
            this.maximumBet = opt.maximumBet;
            this.maximumPlayers = opt.maximumPlayers;
            this.minimumBet = opt.minimumBet;
        }

        #endregion

    }
}
